package me.zhengjie.tools.service

import jakarta.servlet.http.HttpServletResponse
import org.springframework.web.multipart.MultipartFile
import java.io.IOException
import me.zhengjie.tools.domain.Picture
import me.zhengjie.tools.service.dto.PictureQueryCriteria
import org.springframework.data.domain.Pageable


/**
 * @author Kuki Wu
 * @date 2018-12-27
 */
interface PictureService {
    fun queryAll(criteria: PictureQueryCriteria, pageable: Pageable?): Any?
    fun queryAll(criteria: PictureQueryCriteria): List<Picture>
    fun upload(file: MultipartFile, username: String?): Picture?
    fun findById(id: Long): Picture
    fun delete(picture: Picture?)
    fun deleteAll(ids: Array<Long>)

    @Throws(IOException::class)
    fun download(queryAll: List<Picture?>?, response: HttpServletResponse?)
}